package vn.mta.nht.mock.business;

import java.util.List;

import vn.mta.nht.mock.dao.PremiseDAO;
import vn.mta.nht.mock.entity.Premise;

/**
 * author:TruongNH.(nguyenhuutruong.20111991@gmail.com) created date: Dec 21,
 * 2014 version: 1.0
 */
public class PremiseBOImpl implements PremiseBO {

	private PremiseDAO premiseDao;

	public PremiseDAO getPremiseDao() {
		return premiseDao;
	}

	public void setPremiseDao(PremiseDAO premiseDao) {
		this.premiseDao = premiseDao;
	}

	public void save(Premise premise) throws Exception {
		premiseDao.save(premise);
	}

	public void update(Premise premise) throws Exception {
		premiseDao.update(premise);
	}

	public void delete(Premise premise) throws Exception {
		premiseDao.delete(premise);
	}

//	public Premise findByPremiseCode(int preId) throws Exception {
//		return premiseDao.findByPremiseCode(preId);
//
//	}

	public List<Premise> findAll() throws Exception {
		return premiseDao.findAll();
	}
}
